package cn.lcsjsxy.yxz.day.Abnormal;

//基础语法
public class Basicgrammar1 {

    /*
    try:尝试
    catch:捕捉
    finally:最终执行的逻辑



   */

    public static void main(String[] args) {

        int a = 0;
        int b = 0;

        try {
            b = 10 / a;
        }catch (ArithmeticException e){
//            e.getMessage()
//                    e.getCause()
                            e.printStackTrace();;

                            /*
                            a = 10;
                            b = 10 / a;
                            */
        }finally {
            System.out.println("最终执行");
        }

        System.out.println(b);

    }

}